/*
	Copyright (C) 2010 Salil Bhagurkar

	This file is part of salil64

	salil64 is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	salil64 is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with salil64.  If not, see <http://www.gnu.org/licenses/>.
*/
#include "asm.h"
#include <kprint.h>
#include <error.h>
#include "portio.h"

#define SYS_IDLE 0
#define SYS_OPEN 1
#define SYS_CLOSE 2
#define SYS_READ 3
#define SYS_WRITE 4

int interruptHandler(unsigned long index, unsigned long param1, unsigned long param2,
	unsigned long param3, unsigned long param4, unsigned long param5)
{
	kPrint("interruptHandler!\n");
	disableInterrupts();
	haltProcessor();
	/*switch(index) {
		case SYS_IDLE:
			while(1) {
				haltProcessor();
			}
		default:
			return E_NOSUP;
	}*/
}

int archMain()
{
	clrscr();

	init_tables();

	initPaging();

	kPrint("salil64: Long Mode\n");
	kPrint("_kernelEnd: " $x _kernelEnd $ "\n");

	kernelMain();

	return 0;
}
